<template>
  <div class="main">
    <!-- <input type="button" value="退出登录" @click="ChangeExitLogin" /> -->

    <el-container class="main-content">
      <el-aside :width="isCollapse ? '60px' : '210px'">
        <Menu :is-collapse="isCollapse"></Menu>
      </el-aside>
      <el-container>
        <el-header height="50px">
          <MenuHeader @fold-change="handleFoldChange" />
        </el-header>
        <el-main>
          <RouterView></RouterView>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import Menu from "../../components/Menu/Menu.vue";
import MenuHeader from "@/components/Menu/MenuHeader.vue";
import { ref } from "vue";

const isCollapse = ref(false);
function handleFoldChange(flag: boolean) {
  isCollapse.value = flag;
}
</script>
<style lang="less" scoped>
.main {
  height: 100%;
}

.main-content {
  height: 100%;

  .el-aside {
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 200px;
    text-align: left;
    cursor: pointer;
    background-color: #001529;
    scrollbar-width: none; /* firefox */
    -ms-overflow-style: none; /* IE 10+ */

    transition: width 0.3s ease;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .el-main {
    background-color: #f0f2f5;
  }
}
</style>
